-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new chain to a channel #1723
Add new chain to a channel #1723
Conversation
|
All looks good. |
All looks good. |
All looks good. |
<TextInput | ||
label="Your Address on New Chain" | ||
description="Make sure you own this alias as verification will take place." | ||
value={formik.values.alias} | ||
onChange={formik.handleChange('alias')} | ||
error={formik.touched.alias && Boolean(formik.errors.alias)} | ||
errorMessage={formik.touched.alias ? formik.errors.alias : ''} | ||
/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This field needs to have a min and max char length validation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rohitmalhotra1420 there is not fixed length for the address, but have added a function to check if the address is valid
…push-notification-service/push-dapp into DAPP-1704-alias-verification
All looks good. |
const validationSchema = yup.object().shape({ | ||
alias: yup | ||
.string() | ||
.required('Address is required') | ||
.test('is-valid-address', 'Invalid wallet address', isValidAddress), | ||
chainId: yup.string().required('ChainId is required'), | ||
}); | ||
const formik = useFormik<NewChainAddressValue>({ | ||
initialValues: { | ||
alias: '', | ||
chainId: '11155111', | ||
}, | ||
validationSchema: validationSchema, | ||
onSubmit: (values) => { | ||
handleInitiate(values.alias, values.chainId); | ||
}, | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We decided the validation schema, form types and initial values goes to the AddNewChain.form.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rohitmalhotra1420 but useFormik can only be used in a react component, as its a react hook
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not talking out moving out the hook but validation schema, form types and initial values from the component to another file
import { getSelectChains } from '../AddNewChain.utils'; | ||
|
||
export type NewAddressProps = { | ||
formik: any; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
formik: any; | |
form: Type; |
Please provide a type
border-bottom: 1.5px solid var(--stroke-tertiary); | ||
border-left: 1.5px solid var(--stroke-tertiary); | ||
border-bottom-left-radius: 10px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All looks good. |
All looks good. |
@@ -13,7 +13,7 @@ export type TextInputProps = { | |||
type?: 'text' | 'password'; | |||
errorMessage?: string; | |||
label?: string; | |||
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void; | |||
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why make it optional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because even when the input is disabled like in the last section - verify alias, Text input shows error
All looks good. |
All looks good. |
9a68be0
into
Feat-New-Channel-Creation-Flow
* New Channel Creation flow UI * added common stepper * fixed stepper * fixed stepper * fixed stepper * Changed the Stepper flow * added layout * send notif * Add new chain to a channel (#1723) * added basic layout * finished ui * added fixes * addes stepper * added layout of select * fixed width of the popover * fixed alignment * added review comments * fixed form code * removed Box from select * added form context wrapper * moved validation outside * Update index.ts * added formik * New Channel Creation Flow (#1710) * New Channel Creation Flow based on new UI * Function implementation of the create Channel * Added New Page when chain is diff * Fixed the navigation for channel creation flow * Pulled the main to change the theme way * Removed the new createChannel route * Removed faucet duplication * Fixed issue with the text and text color * Fixed the imports and other issues * Resolved the stepper issue * Fixed the input validation and also added validaiton msg * fxed error validations * import fixes * refactoring done * Fixed the stepper steps prop * File upload moved to blocks and form is also corrected for ChannelInfo * Created Alert Block just for error * Removed hidden prop fro file upload and also fixed the stake fees error comment --------- Co-authored-by: rohitmalhotra1420 <[email protected]> * fixed mobile view * fixed mobile view * fixed enter key * added missing things in select * channel dashboard fix * fixed the navigation issue * fixed the navigation issue * fixed review issues --------- Co-authored-by: abhishek-01k <[email protected]> Co-authored-by: Abhishek <[email protected]> Co-authored-by: rohitmalhotra1420 <[email protected]>
* New Channel Creation flow UI * added common stepper * fixed stepper * fixed stepper * New Channel Creation Flow based on new UI * fixed stepper * Function implementation of the create Channel * Changed the Stepper flow * Added New Page when chain is diff * Fixed the navigation for channel creation flow * Pulled the main to change the theme way * Removed the new createChannel route * Removed faucet duplication * Fixed issue with the text and text color * Fixed the imports and other issues * Resolved the stepper issue * Fixed the input validation and also added validaiton msg * fxed error validations * import fixes * refactoring done * Add new chain to a channel (#1723) * added basic layout * finished ui * added fixes * addes stepper * added layout of select * fixed width of the popover * fixed alignment * added review comments * fixed form code * removed Box from select * added form context wrapper * moved validation outside * Update index.ts * Fixed the stepper steps prop * File upload moved to blocks and form is also corrected for ChannelInfo * Created Alert Block just for error * Removed hidden prop fro file upload and also fixed the stake fees error comment --------- Co-authored-by: Monalisha Mishra <[email protected]> Co-authored-by: rohitmalhotra1420 <[email protected]> Co-authored-by: Monalisha Mishra <[email protected]>
…feature (#1782) * Dapp 1752 send notif (#1775) * New Channel Creation flow UI * added common stepper * fixed stepper * fixed stepper * fixed stepper * Changed the Stepper flow * added layout * send notif * Add new chain to a channel (#1723) * added basic layout * finished ui * added fixes * addes stepper * added layout of select * fixed width of the popover * fixed alignment * added review comments * fixed form code * removed Box from select * added form context wrapper * moved validation outside * Update index.ts * added formik * New Channel Creation Flow (#1710) * New Channel Creation Flow based on new UI * Function implementation of the create Channel * Added New Page when chain is diff * Fixed the navigation for channel creation flow * Pulled the main to change the theme way * Removed the new createChannel route * Removed faucet duplication * Fixed issue with the text and text color * Fixed the imports and other issues * Resolved the stepper issue * Fixed the input validation and also added validaiton msg * fxed error validations * import fixes * refactoring done * Fixed the stepper steps prop * File upload moved to blocks and form is also corrected for ChannelInfo * Created Alert Block just for error * Removed hidden prop fro file upload and also fixed the stake fees error comment --------- Co-authored-by: rohitmalhotra1420 <[email protected]> * fixed mobile view * fixed mobile view * fixed enter key * added missing things in select * channel dashboard fix * fixed the navigation issue * fixed the navigation issue * fixed review issues --------- Co-authored-by: abhishek-01k <[email protected]> Co-authored-by: Abhishek <[email protected]> Co-authored-by: rohitmalhotra1420 <[email protected]> * Dapp 1703 channel creation flow UI (#1776) * New Channel Creation flow UI * added common stepper * fixed stepper * fixed stepper * New Channel Creation Flow based on new UI * fixed stepper * Function implementation of the create Channel * Changed the Stepper flow * Added New Page when chain is diff * Fixed the navigation for channel creation flow * Pulled the main to change the theme way * Removed the new createChannel route * Removed faucet duplication * Fixed issue with the text and text color * Fixed the imports and other issues * Resolved the stepper issue * Fixed the input validation and also added validaiton msg * fxed error validations * import fixes * refactoring done * Add new chain to a channel (#1723) * added basic layout * finished ui * added fixes * addes stepper * added layout of select * fixed width of the popover * fixed alignment * added review comments * fixed form code * removed Box from select * added form context wrapper * moved validation outside * Update index.ts * Fixed the stepper steps prop * File upload moved to blocks and form is also corrected for ChannelInfo * Created Alert Block just for error * Removed hidden prop fro file upload and also fixed the stake fees error comment --------- Co-authored-by: Monalisha Mishra <[email protected]> Co-authored-by: rohitmalhotra1420 <[email protected]> Co-authored-by: Monalisha Mishra <[email protected]> * Dapp 1704 alias verification (#1777) * New Channel Creation flow UI * added common stepper * added basic layout * finished ui * added fixes * fixed stepper * addes stepper * fixed stepper * fixed stepper * Changed the Stepper flow * added layout of select * fixed width of the popover * fixed alignment * added review comments * fixed form code * removed Box from select * added form context wrapper * moved validation outside * Update index.ts --------- Co-authored-by: abhishek-01k <[email protected]> Co-authored-by: rohitmalhotra1420 <[email protected]> * Created different routes for Create Channel and Channel Dashboard * Created Channel Dashboard Header and App Footer, also added listSemantics and modified MenuItem.ts file * Added Notification Settings in the dashboard body * Channel Delegates and Get Delegates functionality * Add Delegate and Remove Delegate Functionality added * Deactivate Channel Func added * Added Subgraph component and also used Uint8Array as type * Added token faucet and Reactivate channel function * Added Alert block and also added inline error in the components * Edit Channel Component and Function added * Fixed the build error * Revert "Fixed the build error" This reverts commit 464ce63. * Revert "Edit Channel Component and Function added" This reverts commit c8a440e. * Created New file for edit channel just UI * Edit Channel Functionality added * Changed the route for CreateChannel on Navigation * Check For Changes are implemented in EditChannel * Added tooltip and attached dashboard to notification setting page * Fixed the schematic issue in create channel * Fixed the Send Notification issue and updated Navigation file * Added space between balance and number * Changed the tooltip from description to title * fixed review comments * Fixed the issues on the Channel flow 1 * Fixed the connect modal on create channel and also fixed the overlay for blocknative modal * added frontend fixes * added frontend fixes * added frontend fixes * Added support for differnet chains on dashboard * added select close on scroll * added event removal * alais fixes * added event removal * Fixed the alias featured on the dashboard * added event removal * Fixed the displaying of channel details on dashboard for alias addresses * added validations * fixed review comments * Fixed poling of channel details for the alias condition * fixed ui * fixed closing of unlock in send notif * added fixes * fixed alias issues * Fixed the tag color and the sidebar send notification disappearing issur * Added verified alias logo to the dashboard header --------- Co-authored-by: Monalisha Mishra <[email protected]> Co-authored-by: rohitmalhotra1420 <[email protected]> Co-authored-by: Monalisha Mishra <[email protected]>
Pull Request Template
Ticket Number
Description
Created a new page to add chain to a channel.
Type of Change
Checklist
Frontend Guidelines
Build & Testing
Screenshots/Video with Explanation
Additional Context
Review & Approvals
Notes